<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="reference">
<meta name="DC.Title" content="runtime_loader Class">
<meta name="DC.subject" content="runtime_loader Class">
<meta name="keywords" content="runtime_loader Class">
<meta name="DC.Relation" scheme="URI" content="../../../../reference/appendices/community_preview_features/run_time_loader.htm">
<meta name="DC.Relation" scheme="URI" content="../../../../reference/appendices/community_preview_features/run_time_loader/runtime_loader_cls/error_code_load.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="runtime_loader_cls">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../../../intel_css_styles.css">
<title>runtime_loader Class</title>
<xml>
<MSHelp:Attr Name="DocSet" Value="Intel"></MSHelp:Attr>
<MSHelp:Attr Name="Locale" Value="kbEnglish"></MSHelp:Attr>
<MSHelp:Attr Name="TopicType" Value="kbReference"></MSHelp:Attr>
</xml>
</head>
<body id="runtime_loader_cls">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\..\..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(4);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="runtime_loader_cls"><!-- --></a>

 
  <h1 class="topictitle1">runtime_loader Class</h1>
 
   
  <div> 
	 <div class="section"><h2 class="sectiontitle">Summary</h2> 
		 
		<p>Class for run time control over the loading of an
		  Intel&reg; Threading Building Blocks dynamic library. 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle">Syntax</h2> 
		 
		<pre>class runtime_loader;</pre> 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle">Members</h2> 
		 
		<pre>namespace tbb {
 class runtime_loader {
 // Error codes.
 enum error_code {
 ec_ok, // No errors.
 ec_bad_call, // Invalid function call.
 ec_bad_arg, // Invalid argument passed.
 ec_bad_lib, // Invalid library found.
 ec_bad_ver, // The library found is not suitable.
 ec_no_lib // No library found.
 };
 // Error mode constants.
 enum error_mode {
 em_status, // Save status of operation and continue.
 em_throw, // Throw an exception of error_code type.
 em_abort // Print message to stderr, and abort().
 };
 runtime_loader( error_mode mode = em_abort );
 runtime_loader(
 char const *path[],
 // List of directories to search in.
 int min_ver = TBB_INTERFACE_VERSION,
 // Minimal suitable version
 int max_ver = INT_MAX,
 // Maximal suitable version
 error_mode mode = em_abort
 // Error mode for this instance.
 );
 ~runtime_loader();
 error_code load(
 char const * path[],
 int min_ver = TBB_INTERFACE_VERSION,
 int max_ver = INT_MAX
 );
 error_code status();
 };
 }</pre> 
		
<div class="tablenoborder"><table cellpadding="4" summary="" frame="border" border="1" cellspacing="0" rules="all"><span class="tabledesc">The following table provides additional information on the
			 members of this class. 
		  </span><thead align="left"> 
				<tr> 
				  <th class="cellrowborder" valign="top" width="33.89830508474576%" id="d21286e134">Member 
				  </th>
 
				  <th class="cellrowborder" valign="top" width="66.10169491525423%" id="d21286e137">Description 
				  </th>
 
				</tr>
</thead>
 
			 <tbody> 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d21286e134 "><span class="keyword">runtime_loader( error_mode mode =
						em_abort )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d21286e137 "> 
					 <p>Initialize 
						<samp class="codeph">runtime_loader</samp> but do not load a
						library. 
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d21286e134 "><span class="keyword">runtime_loader(char const *
						path[], int min_ver = TBB_INTERFACE_VERSION, int max_ver = INT_MAX, error_mode
						mode = em_abort )</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d21286e137 "> 
					 <p><strong>Requirements</strong>: The last element of 
						<samp class="codeph">path[]</samp> must
						be 
						<samp class="codeph">NULL</samp>. 
					 </p>
 
					 <p><strong>Effects</strong>: Initialize 
						<samp class="codeph">runtime_loader</samp> and load Intel&reg; Threading Building Blocks (Intel&reg; TBB) 
						(<samp class="codeph">see load()</samp> for details). If 
						<samp class="codeph">error mode</samp>
						equals to em_status, the method 
						<samp class="codeph">status()</samp> can
						be used to check whether the library was loaded or not. If 
						<samp class="codeph">error mode</samp>
						equals to 
						<samp class="codeph">em_throw</samp>, in
						case of a failure an exception of type 
						<samp class="codeph">error_code</samp>
						will be thrown. If 
						<samp class="codeph">error mode</samp>
						equals to 
						<samp class="codeph">em_abort</samp>, in
						case of a failure a message will be printed to stderr, and execution aborted. 
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d21286e134 "><span class="keyword">error_code load(char const *
						path[],int min_ver = TBB_INTERFACE_VERSION, int max_ver = INT_MAX)</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d21286e137 "><a href="runtime_loader_cls/error_code_load.htm">More Info</a> 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d21286e134 "><span class="keyword">error_code status()</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d21286e137 "> 
					 <p><strong>Returns</strong>: If error mode is 
						<samp class="codeph">em_status</samp>,
						the function returns status of the last operation. 
					 </p>
 
				  </td>
 
				</tr>
 
			 </tbody>
 
		  </table>
</div>
 
	 </div>
 
  </div>


<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../../../reference/appendices/community_preview_features/run_time_loader.htm">Run-time loader</a></div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><a href="../../../../reference/appendices/community_preview_features/run_time_loader/runtime_loader_cls/error_code_load.htm">error_code load(char const * path[],int min_ver = TBB_INTERFACE_VERSION, int max_ver = INT_MAX)</a><br>
</li>
</ul>
</div>

</body>
</html>
